package com.ocom.mqsimple.feign;

import com.ocom.common.constant.PayConfigUrl;
import com.ocom.common.entity.card.EntityXfAccountInfo;
import com.ocom.common.request.payconfig.AddCardInfoVo;
import com.ocom.common.request.payconfig.GetOrderMealLeaveRequest;
import com.ocom.common.request.payconfig.UpdateOrderForecastDetailRequest;
import com.ocom.common.request.web.ConsTimeConfigOnShowRequest;
import com.ocom.common.resp.Result;
import com.ocom.common.vo.pay.UpdateListRechargeVo;
import com.ocom.common.vo.payconfig.kitchenprinter.PlanKitchenPrinterRequest;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.Map;

@FeignClient(value = "payconfig")
public  interface PayConfigClientService {

    //初始化账号(addXFAccount)
    @PostMapping(PayConfigUrl.Url_AddXFAccount)
    public Result AddXFAccount(@RequestBody Map map);


    @PostMapping(PayConfigUrl.Url_insertWhiteInfo)
    public Result White(@RequestParam("companyId") Long companyId,@RequestParam("pId") Long pId);

    //获取账号信息(getXFAccount)
    @GetMapping(PayConfigUrl.Url_GetXFAccount)
    public Result GetXFAccount(@RequestParam("comId")Long comId,@RequestParam("pId")Integer pId);

    //获取账号信息(getXFAccount)
    @GetMapping(PayConfigUrl.Url_GetXFAccount)
    public Result<EntityXfAccountInfo> GetXFAccount(@RequestParam("comId") Long comId, @RequestParam("pId") Integer pId, @RequestParam("accountState") Integer accountState);

    /**
     * 个人发卡（addCardInfo）
     * */
    @PostMapping(PayConfigUrl.Url_AddCardInfo)
    public Result AddCardInfo(@RequestBody AddCardInfoVo addCardInfoVo);

    /**
     * 设置白名单
     * */
    @PostMapping(PayConfigUrl.Url_SetXFWhiteInfo)
    public Result setXFWhiteInfo(@RequestParam("comId")Long comId,@RequestParam("pId")Long pId,@RequestParam("state")Long state);


    @PostMapping(PayConfigUrl.Url_UpdateListRecharge)
    public Result UpdateListRecharge(@RequestBody UpdateListRechargeVo updateListRechargeVo);

    @PostMapping(PayConfigUrl.URLP_PayConfig_getMealConsumeReports)
    public Result getMealConsumeReports(@RequestParam("comId") Long comId);


    //2.1.获取餐段名称信息(getMealNameInfo)
    @GetMapping(PayConfigUrl.URLP_PayConfig_GetMealNameInfo)
    Result GetMealNameInfo(@RequestParam("comId") Long comId);

    @GetMapping(PayConfigUrl.Url_GetXFAccountType)
    public Result GetXFAccountType(@RequestParam("comId") Long comId);

    // 修改账号信息(updateXFAccount)
    @PostMapping(PayConfigUrl.Url_UpdateXFAccount)
    public Result UpdateXFAccount(@RequestBody EntityXfAccountInfo entityXfAccountInfo);


    @PostMapping(PayConfigUrl.URLP_getWxInfo)
    public Result getWxInfo(@RequestParam("comId") Long comId ,@RequestParam("merchId")  Long merchId);


    @PostMapping(PayConfigUrl.Url_planKitchenPrinter)
    public Result planKitchenPrinter(@RequestBody PlanKitchenPrinterRequest object);

    @PostMapping(PayConfigUrl.URL_getOrderMealLeave)
    public Result getOrderMealLeave(@RequestBody GetOrderMealLeaveRequest getOrderMealLeaveRequest);

    @PostMapping(PayConfigUrl.URLP_PayConfig_GetMealTimeInfo)
    public Result GetMealTimeInfo(@RequestBody ConsTimeConfigOnShowRequest request);

    @PostMapping(PayConfigUrl.URL_updateOrderForecastDetail)
    public Result updateOrderForecastDetail(@RequestBody UpdateOrderForecastDetailRequest request);
}
